package cn.gok.oop;

import sun.dc.pr.PRError;

class P{
    protected int test(int i){
        return i;
    }

}

class C extends P{
    //重写父类方法test
    public int test(int i){
        return i+1;
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }
}

public class 重写 {
    public static void main(String[] args) {
        P c=new C();
        System.out.println(c.test(10));
    }
}
